import Taro, { Component } from '@tarojs/taro'
import { View, Image, Text } from '@tarojs/components'
import './index.scss'
import {pxTransform} from "@/utils/utils";
import prompt from '@/assets//images/home-prompt.gif'
import { getBrand } from '@/utils/storage'

//  首页积分提示组件
export default class HomePrompt extends Component {
  state: any
  props: any
  static options = {
    addGlobalClass: true
  }

  constructor() {
    super(...arguments)
    this.state = {
      phone: '',
      wechat: '',
      content: '',
      isOpened: false
    }
  }

  componentWillMount() {
    // const config = getAppletConfig()
  }

  render() {
    const { top=0, score } = this.props
    return (
      <View className='home-prompt-page' style={{ top: pxTransform(top) }}>
        <Image src={prompt} className='image m-r-20'/>
        <View className='text'>
          您的<Text className='score'>{score}</Text>{getBrand()}即将过期，请尽快兑换。
        </View>
    </View>)
  }
}
